fix(mcp-worker): restore dynamic client registration endpoint - #581
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
devcycle-mcp-server | 3eafec4 | Aug 05 2026, 03:31 PM |
There was a problem hiding this comment.
Pull request overview
Restores OAuth Dynamic Client Registration support in the remote MCP worker by reintroducing the clientRegistrationEndpoint option on the Cloudflare Workers OAuth provider, so MCP clients that rely on RFC 7591 can obtain a client_id again.
Changes:
- Re-adds
clientRegistrationEndpoint: '/oauth/register'to theOAuthProviderconfiguration. - Adds an in-code comment explaining why the registration endpoint is required (notably for Claude Code /
mcp-remote).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jonathannorris
force-pushed
the
fix/restore-mcp-dcr-577
branch
from
July 28, 2026 19:41
6ddd1b3 to
68eaeaf
Compare
Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
jonathannorris
force-pushed
the
fix/restore-mcp-dcr-577
branch
from
August 5, 2026 15:27
c38653e to
3eafec4
Compare
jonathannorris
enabled auto-merge (squash)
August 5, 2026 15:27
JamieSinn
approved these changes
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
clientRegistrationEndpoint: '/oauth/register'to the remote MCP worker'sOAuthProviderconfig, reverting Remove unused registration endpoint. #577.Content-Security-Policyto the OAuth consent page so client-supplied metadata can never lead to script execution.The Problem
#577 removed the registration endpoint as unused. It wasn't:
@cloudflare/workers-oauth-providerimplements RFC 7591 Dynamic Client Registration automatically wheneverclientRegistrationEndpointis set, and DCR is the only registration mechanism our server offers. Removing it droppedregistration_endpointfrom/.well-known/oauth-authorization-serverand left/oauth/registerreturning404.MCP clients try pre-registered credentials, then CIMD, then DCR (spec). We support none of the first two, so clients fall through to DCR, find no
registration_endpoint, and the MCP TypeScript SDK throws fromregisterClient():That's the error users hit on
claude mcp add --transport http devcycle https://mcp.devcycle.com/mcp(andnpx mcp-remote) since #577 landed. The Claude Code MCP docs call it out by name.Confirmed against production:
Securing the consent page
DCR lets any client register a
client_name/logo_uri, which the consent page reflects ondevcycle.com. Rather than rely on output escaping alone, this makes script execution impossible there:The page has no first-party JavaScript (static HTML, inline
<style>, a<form>), soscript-src 'none'costs nothing and blocks inline<script>, injectedonerror/onloadhandlers, and mutation-XSS variants, independently of escaping. Verified locally by registering a maliciousclient_nameand loading the consent page: header present, page renders normally, name emitted as inert escaped text.Related